import Vue from 'vue'
import VueI18n from 'vue-i18n'
import Cookie from 'js-cookie'
import elementEN from 'element-ui/lib/locale/lang/en' // 引入饿了么的英文包
import elementZH from 'element-ui/lib/locale/lang/zh-CN' // 引入饿了么的中文包
import customZH from './zh' // 引入自定义中文包
import customEN from './en' // 引入自定义英文包
Vue.use(VueI18n) // 全局注册国际化包
export default new VueI18n({
  locale: Cookie.get('language') || 'zh',
  messages: {
    en: {
      ...elementEN,
      ...customEN,
      confirm: ' Are you sure?',
      morning: 'good morning',
      afternoon: 'good  afternoon ',
      night: 'good  night '
    },
    zh: {
      ...elementZH,
      ...customZH,
      confirm: ' 是否确定删除部门?',
      morning: '早上好',
      afternoon: '中午好',
      night: '晚上好'
    }
  }
})
